//
//  WUMYDetailCaseCell.m
//  Home
//
//  Created by 吴军虎吴军虎 on 16/5/13.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "WUMYDetailCaseCell.h"

@interface WUMYDetailCaseCell ()

@property (nonatomic,strong)UIImageView *myImageView;
@property (nonatomic,strong)UILabel *nameL;
@property (nonatomic,strong)UILabel *priceL;
@property (nonatomic,strong)UILabel *sizeL;
@property (nonatomic,strong)UILabel *styleL;
@property (nonatomic,strong)UILabel *addressL;


@end

@implementation WUMYDetailCaseCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubView];
        
    }
    
    return self;
}
- (void)createSubView {
    
    _myImageView = [UIImageView new];
    _myImageView.image = [UIImage imageNamed:@"u=957005295,3708602591&fm=206&gp=0.jpg"];
    [self.myBackWhiteView addSubview:_myImageView];
    [_myImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.myBackWhiteView);
        make.left.mas_equalTo(self.myBackWhiteView);
        make.height.mas_equalTo(self.myBackWhiteView);
        make.width.mas_equalTo(426/3 * AUTO_WIDTH);
        
    }];
    
    
    
    
    
    _nameL = [UILabel new];
    _nameL.text = @"湖滨花园";
    _nameL.textColor = GH;
    _nameL.font = [UIFont fontWithName:TFont size:LOGINFONT * AUTO_WIDTH];
    [self.myBackWhiteView addSubview:_nameL];
    [_nameL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(56/3 * AUTO_HEIGHT);
        make.left.mas_equalTo(_myImageView.mas_right).offset(220/3 * AUTO_WIDTH);
        make.height.mas_equalTo(40/2 * AUTO_HEIGHT);
        
    }];
    
    
    
    
    UIImageView *lim = [UIImageView new];
    [self.myBackWhiteView addSubview:lim];
    lim.image = [UIImage imageNamed:@"虚线"];
    [lim mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerYWithinMargins.mas_equalTo(self.myBackWhiteView);
        make.left.mas_equalTo(_myImageView.mas_right).offset(2 * AUTO_WIDTH);
        make.right.mas_equalTo(self.myBackWhiteView.mas_right).offset(-2 * AUTO_WIDTH);
        make.height.mas_equalTo(1 * AUTO_HEIGHT);
        
    }];
    
    //钱
    UIImageView *priceImageView = [UIImageView new];
    priceImageView.image = [UIImage imageNamed:@"qiang2x"];
    [self.myBackWhiteView addSubview:priceImageView];
    [priceImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(15/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(_myImageView.mas_right).offset(18 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(15 * AUTO_WIDTH, 15 * AUTO_WIDTH));
        
    }];
    
    
    UIImageView *suxian1 = [UIImageView new];
    [self.myBackWhiteView addSubview:suxian1];
    suxian1.image = [UIImage imageNamed:@"虚线竖"];
    [suxian1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(5 * AUTO_HEIGHT);
        make.left.equalTo(priceImageView.mas_right).offset(18 *AUTO_WIDTH);
        make.height.mas_equalTo(35 * AUTO_HEIGHT);
    }];
    
    
    _priceL = [UILabel new];
    _priceL.text = @"30";
    _priceL.textColor = ZI;
    _priceL.textAlignment = NSTextAlignmentCenter;
    _priceL.font = [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    [self.myBackWhiteView addSubview:_priceL];
    [_priceL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(priceImageView.mas_bottom).offset(4 * AUTO_HEIGHT);
        make.height.mas_equalTo(priceImageView);
        make.left.mas_equalTo(_myImageView.mas_right).offset(19 *AUTO_WIDTH);
        
        
    }];

    
    //面积
    UIImageView *PingFangImageView = [UIImageView new];
    PingFangImageView.image=[UIImage imageNamed:@"mi"];
    [self.myBackWhiteView addSubview:PingFangImageView];
    [PingFangImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(lim.mas_bottom).offset(15/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(suxian1.mas_right).offset(18 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(30/2 * AUTO_WIDTH, 30/2 * AUTO_WIDTH));
        
    }];
    
    
    UIImageView *suxian2 = [UIImageView new];
    [self.myBackWhiteView addSubview:suxian2];
    suxian2.image = [UIImage imageNamed:@"虚线竖"];
    [suxian2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(5 * AUTO_HEIGHT);
        make.left.equalTo(PingFangImageView.mas_right).offset(18* AUTO_WIDTH);
        make.height.mas_equalTo(35 * AUTO_HEIGHT);
    }];
    
    
    _sizeL = [UILabel new];
    _sizeL = [UILabel new];
    _sizeL.text = @"110";
    _sizeL.textColor = ZI;
    _sizeL.textAlignment = NSTextAlignmentCenter;
    _sizeL.font = [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    [self.myBackWhiteView addSubview:_sizeL];
    [_sizeL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PingFangImageView.mas_bottom).offset(4 * AUTO_HEIGHT);
        make.height.mas_equalTo(priceImageView);
        make.left.equalTo(suxian1.mas_right).offset(16 *AUTO_WIDTH);
       
        
        
    }];
    
   
    //建筑设计
    UIImageView *homeIV = [UIImageView new];
    [self.myBackWhiteView addSubview:homeIV];
    homeIV.image = [UIImage imageNamed:@"fangwu"];
    [homeIV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(15/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(suxian2.mas_right).offset(22 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(15 * AUTO_WIDTH, 15 * AUTO_WIDTH));
        
    }];
    
    
    
    UIImageView *suxian3 = [UIImageView new];
    [self.myBackWhiteView addSubview:suxian3];
    suxian3.image = [UIImage imageNamed:@"虚线竖"];
    [suxian3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(5 * AUTO_HEIGHT);
        make.left.equalTo(homeIV.mas_right).offset(20 *AUTO_WIDTH);
        make.height.mas_equalTo(35 * AUTO_HEIGHT);
    }];
    
    
    
    _styleL = [UILabel new];
    _styleL = [UILabel new];
    _styleL.text = @"平层户型";
    _styleL.textColor = ZI;
    _styleL.textAlignment = NSTextAlignmentCenter;
    _styleL.font = [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    [self.myBackWhiteView addSubview:_styleL];
    [_styleL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PingFangImageView.mas_bottom).offset(4 * AUTO_HEIGHT);
        make.height.mas_equalTo(priceImageView);
        make.left.mas_equalTo(suxian2.mas_right).offset(4 *AUTO_WIDTH);
    
        
        
    }];

    //风格
    UIImageView *addressIV = [UIImageView new];
    [self.myBackWhiteView addSubview:addressIV];
    addressIV.image = [UIImage imageNamed:@"fenge"];
    [addressIV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lim.mas_bottom).offset(15/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(suxian3.mas_right).offset(18 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(15 * AUTO_WIDTH, 15 * AUTO_WIDTH));
        
        
    }];
    
    _addressL = [UILabel new];
    _addressL = [UILabel new];
    _addressL = [UILabel new];
    _addressL.text = @"地中海岸";
    _addressL.textColor = ZI;
    _addressL.textAlignment = NSTextAlignmentCenter;
    _addressL.font = [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    
    [self.myBackWhiteView addSubview:_addressL];
    [_addressL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PingFangImageView.mas_bottom).offset(4 * AUTO_HEIGHT);
        make.height.mas_equalTo(priceImageView);
        make.left.equalTo(suxian3.mas_right).offset(2*AUTO_WIDTH);
        
    }];
    
    
}


@end
